/*
 * threadmutex.h
 *
 *  Created on: 2012-5-2
 *      Author: epmm
 */

#ifndef THREADMUTEX_H_
#define THREADMUTEX_H_

class CThreadMutex
{
	pthread_mutex_t m_Mutex;
public:
	CThreadMutex();
	virtual ~CThreadMutex();
public:
	void initMutex();
	void destroyMutex();

	pthread_mutex_t* getLock();
	int Lock();
	int tryLock();
	int unLock();
};

#endif /* THREADMUTEX_H_ */
